var mongoose = require('mongoose')
var Schema = mongoose.Schema
var User = new Schema({
	"userId": String,
	"userName": String,
	"userPwd": String,
	"orderList": Array,
	"cartList": [{
		"productId": String,
		"productName": String,
		"salePrice": String,
		"productImg": String,
		"checked": {
			type: String,
			default: 1
		},
		"productNum": {
			type: String,
			default: 1
		}
	}],
	"addressList": [{
			"addressId": String,
			"userName": String,
			"streeName": String,
			"tel": String,
			"postCode": String,
			"isDefault": Boolean
		}

	]
})
module.exports = mongoose.model('user', User)